const fs = require('fs');

fs.stat('./text-buffer.txtx', (err, stats) => {
  if (err) {
    console.log('文件不存在');
    return;
  }
  console.log('isFile>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>');
  console.log(stats.isFile());
  console.log('isDir>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>');
  console.log(stats.isDirectory());
  console.log('list stats>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>');
  console.log(stats);
});